// 框架和组件库
import type { TableProps } from "tdesign-vue-next";

// 工具函数
import dayjs from "dayjs";

export const tableColumns = [
  {
    colKey: "startPort",
    title: "起运港",
    width: 200
  },
  {
    colKey: "targetPort",
    title: "目的港",
    width: 200
  },
  {
    colKey: "transferPort",
    title: "中转港",
    width: 200
  },
  {
    colKey: "shipCompany",
    title: "船公司",
    width: 200
  },
  {
    colKey: "billNo",
    title: "提单号",
    width: 200
  },
  {
    colKey: "startExpressTime",
    title: "开船时间",
    width: 200,
    cell: (h, { row }) => {
      return dayjs(row.startExpressTime).format("YYYY-MM-DD HH:mm");
    }
  },
  {
    colKey: "cutoffTime",
    title: "截单时间",
    width: 200,
    cell: (h, { row }) => {
      return dayjs(row.cutoffTime).format("YYYY-MM-DD HH:mm");
    }
  },
  {
    colKey: "cutoffCustomsTime",
    title: "截关时间",
    width: 200,
    cell: (h, { row }) => {
      return dayjs(row.cutoffCustomsTime).format("YYYY-MM-DD HH:mm");
    }
  },
  {
    colKey: "typeOfShipping",
    title: "运输方式",
    width: 200
  }
] as TableProps["columns"];
